package com.cizzy.relation.entity;

import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.sql.Time;
import java.sql.Timestamp;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import lombok.*;

/**
 * <p>
 *
 * </p>
 *
 * @author crissy-月下闲人
 * @since 2023-11-03
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
//@ApiModel(value = "Relation对象", description = "")
public class Relation implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("relation_id")
    private Long relationId;

    private Timestamp createAt = new Timestamp(System.currentTimeMillis());

    private Long userId;

    private Long targetId;

    public Relation(Long userId, Long targId) {
        this.userId = userId;
        this.targetId = targId;
        this.createAt = new Timestamp(System.currentTimeMillis());
    }
}
